package hcn.response;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import java.io.Serializable;
import java.util.List;

/**
 * @author fzy91
 * @title: PrescriptionList
 * @projectName common-clinical
 * @description: 处方发药集合
 * @date 2022/5/2615:16
 */
public class PrescriptionList implements Serializable {
    //发药记录序号
    private String dispensingRecordId;
    //排队号（预留）
    private String queueNumber;
    //就诊医疗机构组织机构代码
    private String visitOrganization;
    // 处方/医嘱编号
    private String prescriptionRecordId;
    //发药窗口
    private String dispensingWindow;
    //发药地点
    private String dispensingAddress;
    //药房名称
    private String pharmacyName;
    //药房编码
    private String pharmacyCode;
    // 就诊机构名称
    private String visitOrganizationName;
    //发药日期时间
    private String dispensingDateTime;
    //处方/医嘱状态（1-调配中，2-代签到，3-待取药，4-已取药） ;
    private String prescriptionState;

    //药品信息集合（处方下的所有药品）
    private List<PrescriptionDrugs> prescriptionDrugs;

    @XmlElement(name = "DispensingRecordId")
    public String getDispensingRecordId() {
        return dispensingRecordId;
    }

    public void setDispensingRecordId(String dispensingRecordId) {
        this.dispensingRecordId = dispensingRecordId;
    }

    @XmlElement(name = "QueueNumber")
    public String getQueueNumber() {
        return queueNumber;
    }

    public void setQueueNumber(String queueNumber) {
        this.queueNumber = queueNumber;
    }

    @XmlElement(name = "VisitOrganization")
    public String getVisitOrganization() {
        return visitOrganization;
    }

    public void setVisitOrganization(String visitOrganization) {
        this.visitOrganization = visitOrganization;
    }

    @XmlElement(name = "PrescriptionRecordId")
    public String getPrescriptionRecordId() {
        return prescriptionRecordId;
    }

    public void setPrescriptionRecordId(String prescriptionRecordId) {
        this.prescriptionRecordId = prescriptionRecordId;
    }

    @XmlElement(name = "DispensingWindow")
    public String getDispensingWindow() {
        return dispensingWindow;
    }

    public void setDispensingWindow(String dispensingWindow) {
        this.dispensingWindow = dispensingWindow;
    }

    @XmlElement(name = "DispensingAddress")
    public String getDispensingAddress() {
        return dispensingAddress;
    }

    public void setDispensingAddress(String dispensingAddress) {
        this.dispensingAddress = dispensingAddress;
    }

    @XmlElement(name = "PharmacyName")
    public String getPharmacyName() {
        return pharmacyName;
    }

    public void setPharmacyName(String pharmacyName) {
        this.pharmacyName = pharmacyName;
    }

    @XmlElement(name = "PharmacyCode")
    public String getPharmacyCode() {
        return pharmacyCode;
    }

    public void setPharmacyCode(String pharmacyCode) {
        this.pharmacyCode = pharmacyCode;
    }

    @XmlElement(name = "VisitOrganizationName")
    public String getVisitOrganizationName() {
        return visitOrganizationName;
    }

    public void setVisitOrganizationName(String visitOrganizationName) {
        this.visitOrganizationName = visitOrganizationName;
    }

    @XmlElement(name = "DispensingDateTime")
    public String getDispensingDateTime() {
        return dispensingDateTime;
    }

    public void setDispensingDateTime(String dispensingDateTime) {
        this.dispensingDateTime = dispensingDateTime;
    }

    @XmlElement(name = "PrescriptionState")
    public String getPrescriptionState() {
        return prescriptionState;
    }

    public void setPrescriptionState(String prescriptionState) {
        this.prescriptionState = prescriptionState;
    }

    @XmlElementWrapper(name = "PrescriptionDrugs")
    @XmlElement(name = "PrescriptionDrug")
    public List<PrescriptionDrugs> getPrescriptionDrugs() {
        return prescriptionDrugs;
    }

    public void setPrescriptionDrugs(List<PrescriptionDrugs> prescriptionDrugs) {
        this.prescriptionDrugs = prescriptionDrugs;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"dispensingRecordId\":\"")
                .append(dispensingRecordId).append('\"');
        sb.append(",\"queueNumber\":\"")
                .append(queueNumber).append('\"');
        sb.append(",\"visitOrganization\":\"")
                .append(visitOrganization).append('\"');
        sb.append(",\"prescriptionRecordId\":\"")
                .append(prescriptionRecordId).append('\"');
        sb.append(",\"dispensingWindow\":\"")
                .append(dispensingWindow).append('\"');
        sb.append(",\"dispensingAddress\":\"")
                .append(dispensingAddress).append('\"');
        sb.append(",\"pharmacyName\":\"")
                .append(pharmacyName).append('\"');
        sb.append(",\"pharmacyCode\":\"")
                .append(pharmacyCode).append('\"');
        sb.append(",\"visitOrganizationName\":\"")
                .append(visitOrganizationName).append('\"');
        sb.append(",\"dispensingDateTime\":\"")
                .append(dispensingDateTime).append('\"');
        sb.append(",\"prescriptionState\":\"")
                .append(prescriptionState).append('\"');
        sb.append(",\"prescriptionDrugs\":")
                .append(prescriptionDrugs);
        sb.append('}');
        return sb.toString();
    }
}
